#include "stdafx.h"
#include "SetupBootstrapLib.h"
#include "SetupBootstrapLibInternal.h"


BOOL IsSQLExpress2005SP2Installed( void )
{
	CRegKey key;
	if( key.Open(HKEY_LOCAL_MACHINE,"SOFTWARE\\Microsoft\\Microsoft SQL Server\\SQLEXPRESS\\MSSQLServer\\CurrentVersion") != ERROR_SUCCESS )
		return FALSE;

	char buffer[64];
	ULONG chars = sizeof(buffer) / sizeof(buffer[0]);
	if( key.QueryStringValue("CurrentVersion",buffer,&chars) != ERROR_SUCCESS )
		return FALSE;

	CString value = buffer;

	if( value = "9.00.3042.00" )
		return TRUE; 

	return FALSE;

}